]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/volume: Check the stream before accessing it
authorJordan Petridis <jpetridis@gnome.org>
Mon, 16 Feb 2026 02:06:55 +0000 (04:06 +0200)
committerMarge Bot <marge-bot@gnome.org>
Mon, 16 Feb 2026 15:12:36 +0000 (15:12 +0000)
stream-updated will also get emitted when the stream is unset, and trying
to access it then breaks.

In such case we don't need to update the css class of the indicator as it
will be hidden, and we will get another stream-updated before we show
it again anyway.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4076>

js/ui/status/volume.js

index deadc16b734590cfa81b19cf5f24ec40ff6c9f45..d56cd725285c71df9eb0dff27e81e54755184ae6 100644 (file)
@@ -534,6 +534,9 @@ class InputIndicator extends VolumeIndicator {
     }
 
     _updatePrivacyIndicator() {
+        if (!this._stream)
+            return;
+
         // Muted microphone doesn't need privacy indicator (no privacy concern)
         const {isMuted} = this._input._stream;
         if (isMuted)